package cn.anlab.anappframe.net.sub;

import java.io.IOException;

/**
 * 连接监听
 * 
 * @version 1.0
 * @author Stan Rong 2012-3-6
 */
public interface ConnectionListener {

//	onConnect, onDisconnect, onData
	
	/**
	 * 连接时触发
	 * @return
	 * @throws IOException
	 */
	public boolean onConnect() throws IOException;
	
	/**
	 * 断开连接时触发
	 * @return
	 * @throws IOException
	 */
	public boolean onDisconnect() throws IOException;
	
	/**
	 * 连接超时时触发
	 * @return
	 * @throws IOException
	 */
	public boolean onConnectionTimeout() throws IOException;
	
	
	public boolean onIdleTimeout() throws IOException;
	
	public boolean onData() throws IOException;
	
	
}
